<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Mysql索引最佳攻略 | 叫我华仔~</title>
    <meta name="description" content="Write the Code. Change the world">
    <link rel="shortcut icon" type="image/x-icon" href="https://tva1.sinaimg.cn/large/0060lm7Tly1g4lrkxbno3j30go0gogm9.jpg">
    
    <link rel="preload" href="/assets/css/0.styles.cd3776eb.css" as="style"><link rel="preload" href="/assets/js/app.48b22e4d.js" as="script"><link rel="preload" href="/assets/js/2.3fdd559a.js" as="script"><link rel="preload" href="/assets/js/8.a13d01b5.js" as="script"><link rel="prefetch" href="/assets/js/10.e1dd09fa.js"><link rel="prefetch" href="/assets/js/11.4aed7e88.js"><link rel="prefetch" href="/assets/js/12.82f25f15.js"><link rel="prefetch" href="/assets/js/13.0fee9ac6.js"><link rel="prefetch" href="/assets/js/14.12b766db.js"><link rel="prefetch" href="/assets/js/15.867ab787.js"><link rel="prefetch" href="/assets/js/3.378e0b39.js"><link rel="prefetch" href="/assets/js/4.3e162dee.js"><link rel="prefetch" href="/assets/js/5.3b714238.js"><link rel="prefetch" href="/assets/js/6.80a92dc6.js"><link rel="prefetch" href="/assets/js/7.f7efdc2b.js"><link rel="prefetch" href="/assets/js/9.2299158f.js">
    <link rel="stylesheet" href="/assets/css/0.styles.cd3776eb.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">叫我华仔~</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/nodejs/JavaScript/JavaScript面试题大全.html" class="nav-link">Nodejs</a></div><div class="nav-item"><a href="/database/mysql/Explain详解.html" class="nav-link">Database</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Linux-Deploy</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/linux-deploy/docker/优化docker打包速度和体积.html" class="nav-link">Docker</a></li></ul></div></div><div class="nav-item"><a href="/tools/Blog推荐.html" class="nav-link">Tools</a></div><div class="nav-item"><a href="/user/me.html" class="nav-link">关于我</a></div><div class="nav-item"><a href="https://github.com/zwhgithub" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/nodejs/JavaScript/JavaScript面试题大全.html" class="nav-link">Nodejs</a></div><div class="nav-item"><a href="/database/mysql/Explain详解.html" class="nav-link">Database</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Linux-Deploy</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/linux-deploy/docker/优化docker打包速度和体积.html" class="nav-link">Docker</a></li></ul></div></div><div class="nav-item"><a href="/tools/Blog推荐.html" class="nav-link">Tools</a></div><div class="nav-item"><a href="/user/me.html" class="nav-link">关于我</a></div><div class="nav-item"><a href="https://github.com/zwhgithub" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Github
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Mysql</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/database/mysql/Explain详解.html" class="sidebar-link">Explain详解</a></li><li><a href="/database/mysql/Mysql索引最佳攻略.html" class="active sidebar-link">Mysql索引最佳攻略</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/database/mysql/Mysql一些记不住的.html" class="sidebar-link">Mysql一些记不住的</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h3 id="联合索引，最右匹配原则"><a href="#联合索引，最右匹配原则" aria-hidden="true" class="header-anchor">#</a> 联合索引，最右匹配原则</h3> <div class="language-sql line-numbers-mode"><pre class="language-sql"><code>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/database/mysql/Explain详解.html" class="prev">
          Explain详解
        </a></span> <span class="next"><a href="/database/mysql/Mysql一些记不住的.html">
          Mysql一些记不住的
        </a>
        →
      </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.48b22e4d.js" defer></script><script src="/assets/js/2.3fdd559a.js" defer></script><script src="/assets/js/8.a13d01b5.js" defer></script>
  </body>
</html>
